<template>
  <view class="content">
    <image class="logo" src="@/static/logo.png"></image>
    <PlannerMessages />
    <button type="primary" @click="handleExit" style="margin-top: 290px">
      退出
    </button>
  </view>
</template>

<script>
import { getUserProfile } from "@/api/system/user";
import PlannerMessages from "@/pages/work/bpm/marketing/planner/plannerMessages.vue";
import storage from "@/utils/storage";

export default {
  components: { PlannerMessages },
  data() {
    return {
      user: {},
      roleGroup: "",
      postGroup: "",
    };
  },
  onLoad: function () {
    this.getUser();
  },
  methods: {
    getUser() {
      getUserProfile().then((response) => {
        this.user = response.data;
        this.roleGroup = response.roleGroup;
        this.postGroup = response.postGroup;
      });
    },
    handleGetUser() {
      this.getUser();

      this.$tab.switchTab("/pages/work/index");
    },
    handleExit() {
      this.$store.dispatch("LogOut").then(() => {
        this.$tab.reLaunch("/pages/index");
      });
    },
  },
};
</script>

<style>
.content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.logo {
  height: 200rpx;
  width: 200rpx;
  margin-top: 200rpx;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 50rpx;
}

.text-area {
  display: flex;
  justify-content: center;
}

.title {
  font-size: 36rpx;
  color: #8f8f94;
}
</style>
